Integrand size = 27, antiderivative size = 126 \[ \int \frac {(e+f x) \text {csch}(c+d x)}{a+i a \sinh (c+d x)} \, dx=-\frac {2 (e+f x) \text {arctanh}\left (e^{c+d x}\right )}{a d}+\frac {2 i f \log \left (\cosh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )\right )}{a d^2}-\frac {f \operatorname {PolyLog}\left (2,-e^{c+d x}\right )}{a d^2}+\frac {f \operatorname {PolyLog}\left (2,e^{c+d x}\right )}{a d^2}-\frac {i (e+f x) \tanh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )}{a d} \]
[Out]
Time = 0.11 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {5694, 4267, 2317, 2438, 3399, 4269, 3556} \[ \int \frac {(e+f x) \text {csch}(c+d x)}{a+i a \sinh (c+d x)} \, dx=-\frac {2 (e+f x) \text {arctanh}\left (e^{c+d x}\right )}{a d}-\frac {f \operatorname {PolyLog}\left (2,-e^{c+d x}\right )}{a d^2}+\frac {f \operatorname {PolyLog}\left (2,e^{c+d x}\right )}{a d^2}+\frac {2 i f \log \left (\cosh \left (\frac {c}{2}+\frac {d x}{2}+\frac {i \pi }{4}\right )\right )}{a d^2}-\frac {i (e+f x) \tanh \left (\frac {c}{2}+\frac {d x}{2}+\frac {i \pi }{4}\right )}{a d} \]
[In]
[Out]
Rule 2317
Rule 2438
Rule 3399
Rule 3556
Rule 4267
Rule 4269
Rule 5694
Rubi steps \begin{align*} \text {integral}& = -\left (i \int \frac {e+f x}{a+i a \sinh (c+d x)} \, dx\right )+\frac {\int (e+f x) \text {csch}(c+d x) \, dx}{a} \\ & = -\frac {2 (e+f x) \text {arctanh}\left (e^{c+d x}\right )}{a d}-\frac {i \int (e+f x) \csc ^2\left (\frac {1}{2} \left (i c+\frac {\pi }{2}\right )+\frac {i d x}{2}\right ) \, dx}{2 a}-\frac {f \int \log \left (1-e^{c+d x}\right ) \, dx}{a d}+\frac {f \int \log \left (1+e^{c+d x}\right ) \, dx}{a d} \\ & = -\frac {2 (e+f x) \text {arctanh}\left (e^{c+d x}\right )}{a d}-\frac {i (e+f x) \tanh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )}{a d}-\frac {f \text {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{c+d x}\right )}{a d^2}+\frac {f \text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{c+d x}\right )}{a d^2}+\frac {(i f) \int \coth \left (\frac {c}{2}-\frac {i \pi }{4}+\frac {d x}{2}\right ) \, dx}{a d} \\ & = -\frac {2 (e+f x) \text {arctanh}\left (e^{c+d x}\right )}{a d}+\frac {2 i f \log \left (\cosh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )\right )}{a d^2}-\frac {f \operatorname {PolyLog}\left (2,-e^{c+d x}\right )}{a d^2}+\frac {f \operatorname {PolyLog}\left (2,e^{c+d x}\right )}{a d^2}-\frac {i (e+f x) \tanh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )}{a d} \\ \end{align*}
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(257\) vs. \(2(126)=252\).
Time = 2.22 (sec) , antiderivative size = 257, normalized size of antiderivative = 2.04 \[ \int \frac {(e+f x) \text {csch}(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {\left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right ) \left (f (c+d x) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )-2 f \arctan \left (\tanh \left (\frac {1}{2} (c+d x)\right )\right ) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )+i f \log (\cosh (c+d x)) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )+\left (d (e+f x) \left (\log \left (1-e^{c+d x}\right )-\log \left (1+e^{c+d x}\right )\right )-f \operatorname {PolyLog}\left (2,-e^{c+d x}\right )+f \operatorname {PolyLog}\left (2,e^{c+d x}\right )\right ) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )-2 i d (e+f x) \sinh \left (\frac {1}{2} (c+d x)\right )\right )}{d^2 (a+i a \sinh (c+d x))} \]
[In]
[Out]
Time = 1.69 (sec) , antiderivative size = 211, normalized size of antiderivative = 1.67
method | result | size |
risch | \(\frac {2 f x +2 e}{d a \left ({\mathrm e}^{d x +c}-i\right )}+\frac {2 i f \ln \left ({\mathrm e}^{d x +c}-i\right )}{a \,d^{2}}-\frac {2 i f \ln \left ({\mathrm e}^{d x +c}\right )}{a \,d^{2}}+\frac {e \ln \left ({\mathrm e}^{d x +c}-1\right )}{a d}-\frac {e \ln \left ({\mathrm e}^{d x +c}+1\right )}{a d}+\frac {f \ln \left (1-{\mathrm e}^{d x +c}\right ) c}{a \,d^{2}}-\frac {c f \ln \left ({\mathrm e}^{d x +c}-1\right )}{a \,d^{2}}+\frac {f \operatorname {polylog}\left (2, {\mathrm e}^{d x +c}\right )}{a \,d^{2}}-\frac {f \operatorname {polylog}\left (2, -{\mathrm e}^{d x +c}\right )}{a \,d^{2}}+\frac {f \ln \left (1-{\mathrm e}^{d x +c}\right ) x}{a d}-\frac {f \ln \left ({\mathrm e}^{d x +c}+1\right ) x}{a d}\) | \(211\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 211 vs. \(2 (104) = 208\).
Time = 0.26 (sec) , antiderivative size = 211, normalized size of antiderivative = 1.67 \[ \int \frac {(e+f x) \text {csch}(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {-2 i \, d f x e^{\left (d x + c\right )} + 2 \, d e - {\left (f e^{\left (d x + c\right )} - i \, f\right )} {\rm Li}_2\left (-e^{\left (d x + c\right )}\right ) + {\left (f e^{\left (d x + c\right )} - i \, f\right )} {\rm Li}_2\left (e^{\left (d x + c\right )}\right ) + {\left (i \, d f x + i \, d e - {\left (d f x + d e\right )} e^{\left (d x + c\right )}\right )} \log \left (e^{\left (d x + c\right )} + 1\right ) - 2 \, {\left (-i \, f e^{\left (d x + c\right )} - f\right )} \log \left (e^{\left (d x + c\right )} - i\right ) + {\left (-i \, d e + i \, c f + {\left (d e - c f\right )} e^{\left (d x + c\right )}\right )} \log \left (e^{\left (d x + c\right )} - 1\right ) + {\left (-i \, d f x - i \, c f + {\left (d f x + c f\right )} e^{\left (d x + c\right )}\right )} \log \left (-e^{\left (d x + c\right )} + 1\right )}{a d^{2} e^{\left (d x + c\right )} - i \, a d^{2}} \]
[In]
[Out]
\[ \int \frac {(e+f x) \text {csch}(c+d x)}{a+i a \sinh (c+d x)} \, dx=- \frac {i \left (\int \frac {e \operatorname {csch}{\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx + \int \frac {f x \operatorname {csch}{\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx\right )}{a} \]
[In]
[Out]
\[ \int \frac {(e+f x) \text {csch}(c+d x)}{a+i a \sinh (c+d x)} \, dx=\int { \frac {{\left (f x + e\right )} \operatorname {csch}\left (d x + c\right )}{i \, a \sinh \left (d x + c\right ) + a} \,d x } \]
[In]
[Out]
\[ \int \frac {(e+f x) \text {csch}(c+d x)}{a+i a \sinh (c+d x)} \, dx=\int { \frac {{\left (f x + e\right )} \operatorname {csch}\left (d x + c\right )}{i \, a \sinh \left (d x + c\right ) + a} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(e+f x) \text {csch}(c+d x)}{a+i a \sinh (c+d x)} \, dx=\int \frac {e+f\,x}{\mathrm {sinh}\left (c+d\,x\right )\,\left (a+a\,\mathrm {sinh}\left (c+d\,x\right )\,1{}\mathrm {i}\right )} \,d x \]
[In]
[Out]